import { withParams, req } from 'vuelidate/lib/validators/common'

export default () => withParams({ type: 'mobile' }, value => 
req(value) && new RegExp(/^((\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)$/).test(value))
